<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<body>
  <div id="app">
    <h1>{{ str  }}</h1>
    {{  str }}
    <span>
      {{ name  }}
    </span>
    <button @click="btn">按钮</button>
  </div>
  <!-- <script src="../vue.js"></script> -->
  <script src="./vue.js"></script>
  <script>
    new Vue({
      el: '#app',
      data: {
        str: '123',
        name: 'yyyyz'
      },
      beforeCreate() {
        console.log("beforeCreate", this.$data, this.$el);
      },
      created() {
        console.log("created", this.$data, this.$el);
      },
      beforeMount() {
        console.log("beforeMount", this.$data, this.$el);
      },
      mounted() {
        console.log("mounted", this.$data, this.$el);
      },
      methods: {
        btn(e) {
          console.log("点击了一下按钮", e, this, this.str);
        }
      }
      // beforeUpdate() {

      // },
      // updated() {

      // },
      // beforeDestory() {

      // },
      // destoryed() {

      // }
    })
  </script>
</body>
</html>